home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / u_man / cat1 / cord.z / cord
Text File  |  1998-10-30  |  8KB  |  199 lines

  1.  
  2.  
  3.  
  4. CCCCOOOORRRRDDDD((((1111))))                                                                CCCCOOOORRRRDDDD((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      cord - rearranges procedures in an executable.
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ccccoooorrrrdddd prog [option] ... [reorder_file] ...
  13.  
  14. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  15.      The _c_o_r_d(1) command can be used to rearrange procedures in an executable
  16.      object to correspond with an ordering provided in a _r_e_o_r_d_e_r__f_i_l_e.
  17.      Normally, the ordering is arranged to reduce virtual memory paging and/or
  18.      instruction cache misses.  The reorder file can be produced by the
  19.      ----ffffeeeeeeeeddddbbbbaaaacccckkkk option to pppprrrrooooffff (see _p_r_o_f(1)).  The ----ggggpppprrrrooooffff -_f_e_e_d_b_a_c_k options in
  20.      _p_r_o_f can be used to produce a procedure ordering based on the function
  21.      call counts. The default reorder file is _p_r_o_g._p_i_x_i_e._f_b (if that does not
  22.      exist, _p_r_o_g._f_b is used if _p_r_o_g._f_b exists).  You can also hand-optimize
  23.      the reorder file by rearranging the procedure entries in the reorder
  24.      file.
  25.  
  26.      In the example below, a program _f_o_o is run through _p_i_x_i_e(1) which
  27.      generates foo.pixie.  The instrumented executable is run and _p_r_o_f is used
  28.      to produce a feedback file from the profiled data.  _C_o_r_d is then used to
  29.      reorder the procedures in _f_o_o, generating a new binary foo.cord.
  30.  
  31.             pixie foo
  32.             foo.pixie
  33.             prof -pixie -feedback foo
  34.             cord foo foo.pixie.fb
  35.  
  36.      The degree and specifics of procedure rearrangement depend on the data
  37.      produced by the profiled runs of the executable. The more closely these
  38.      profiled runs approximate the actual use of the executable, the closer to
  39.      optimal the resulting rearrangement will be. Design your profiled runs
  40.      accordingly.
  41.  
  42.      Multiple reorder files can be specified in the command line. The first
  43.      reorder file has the highest priority in rearranging the ordering. This
  44.      feature can be used to improve performance in different program phases,
  45.      if the multiple feedback files are generated by executing different
  46.      phases of the program.
  47.  
  48.      The _c_o_r_d command accepts these options:
  49.  
  50.           ----mmmmeeeerrrrggggeeee  _m_e_r_g_e_f_i_l_e
  51.                Specifies the "merged" reorder file. The final procedure
  52.                ordering is listed in this file. When multiple reorder files
  53.                are specified in the command line, the file represents a merged
  54.                ordering of those files.  When only one reorder file is
  55.                provided, the final order may still be different from specified
  56.                in the reorder file. The reasons can be to workaround CPU bugs,
  57.                procedures not specified in the reorder file, or procedures
  58.                tied together by semantic constraints.
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CCCCOOOORRRRDDDD((((1111))))                                                                CCCCOOOORRRRDDDD((((1111))))
  71.  
  72.  
  73.  
  74.           ----oooo _o_u_t_f_i_l_e
  75.                Specifies the output file. If this option is not specified,
  76.                _p_r_o_g._c_o_r_d is used.
  77.  
  78.           ----tttt   Prints a report of procedures tied together (procedures that
  79.                cannot be separated, regardless of other ordering
  80.                considerations).  This essentially always means the procedures
  81.                are hand-written assembler.  If procedures cannot be separated
  82.                because one falls thru into another or has some other special
  83.                non-branch connection an MMMM (to suggest _m_e_r_g_e_d procedures) is
  84.                printed on the report line.  If procedures cannot be separated
  85.                because one explicitly branches into another, the letter BBBB is
  86.                printed on the report line.  If both characteristics apply then
  87.                both letters are printed.  If a sequence of procedures (more
  88.                than two) are tied together, then the second and subsequent in
  89.                the sequence show a blank name as the first procedure name.
  90.                Sample output:
  91.  
  92.                    Note: _sproc     tied to _sprocsp    MB
  93.                    Note:            tied to _nsproc     MB
  94.  
  95.  
  96.           ----vvvv   Prints verbose information. This includes listing procedures
  97.                considered part of other procedures and therefore cannot be
  98.                rearranged (these are basically assembler procedures that may
  99.                contain relative branches to other procedures rather than
  100.                relocatable ones). The listing also shows conflicts between
  101.                procedures in the binary and in the reorder file.
  102.  
  103.           ----BBBB   For old 32bit ABI binaries with more than 64K procedures (this
  104.                is a very exceptional case) this option results in a more
  105.                certain correct update of the ._m_d_e_b_u_g section data.  The
  106.                ._m_d_e_b_u_g section is used by debuggers: it does not affect
  107.                program execution.  Do not use this option unless you know
  108.                positively you have more than 64K procedures in the old 32bit
  109.                ABI binary being _c_o_r_ded.
  110.  
  111. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  112.      The message
  113.  
  114.          Warning: Use cord -v to see procedures in binary that are not in
  115.          feedback file.
  116.  
  117.      means that the feedback file does not list every procedure in the binary.
  118.  
  119.      The message
  120.  
  121.          Warning: Use cord -v to see procedures in feedback file that are not
  122.          in binary.
  123.  
  124.      means that the feedback file lists procedures that do not exist in the
  125.      binary.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CCCCOOOORRRRDDDD((((1111))))                                                                CCCCOOOORRRRDDDD((((1111))))
  137.  
  138.  
  139.  
  140.      These are normally harmless warnings, but if you are not expecting any
  141.      name mismatches, rerun cord with the ----vvvv option to see what procedures
  142.      mismatched.
  143.  
  144. FFFFIIIILLLLEEEESSSS
  145.      /usr/bin/cord
  146.  
  147. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  148.      prof(1), pixie(1)
  149.  
  150. NNNNOOOOTTTTEEEESSSS
  151.      For C++, feedback files input to _c_o_r_d normally have the mangled C++
  152.      function name.  _c_o_r_d matches the procedure names from a feedback file
  153.      against both the mangled or unmangled procedure names (as extracted from
  154.      the debugging information) and accepts a match on either (when combined
  155.      with a match against the base file name (the file with all path prefixes
  156.      stripped off)).  The unmangled name _c_o_r_d uses does not have a class name
  157.      prefix, so the unmangled form is not very safe to use.
  158.  
  159.      Inlined functions cannot be touched by _c_o_r_d:  the non-inlined procedures
  160.      are all that can usefully be _c_o_r_ded.
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.